<template>
  <div class="keshi">
    <div>
      <span>机构名称：</span>
      <el-input
        placeholder="请输入机构名称"
        size="small"
        style="width: 200px"
      ></el-input>
      <el-button type="primary" size="small" style="margin-left: 15px"
        >查询</el-button
      >
      <el-button
        type="primary"
        plain
        size="small"
        style="float: right; background-color: #fff; color: rgb(47, 160, 254)"
        @click="dialogVisible = true"
        >新增</el-button
      >
    </div>
    <el-table
      :data="tableData"
      style="width: 100%; margin-top: 15px"
      :header-cell-style="{
        color: '#000',
        backgroundColor: 'rgb(222,234,255)',
      }"
      height="650"
    >
      <el-table-column prop="index" label="序号" width="250"> </el-table-column>
      <el-table-column prop="name" label="机构名称" width="250">
      </el-table-column>
      <el-table-column prop="name" label="标准机构" width="250">
      </el-table-column>
      <el-table-column prop="state" label="机构状态" width="250">
      </el-table-column>
      <el-table-column prop="date" label="创建时间" width="250">
      </el-table-column>
      <el-table-column prop="date" label="操作" width="250" fixed="right">
        <template slot-scope="">
          <el-button
            type="primary"
            plain
            size="mini"
            style="background-color: #fff; color: rgb(47, 160, 254)"
            @click="dialogVisible = true"
            >编辑</el-button
          >
          <el-button
            type="primary"
            plain
            size="mini"
            style="background-color: #fff; color: rgb(47, 160, 254)"
            >禁用</el-button
          >
          <el-button
            type="primary"
            plain
            size="mini"
            style="background-color: #fff; color: rgb(47, 160, 254)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <div style="text-align: right; margin-top: 20px">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page.sync="currentPage3"
        :page-size="100"
        layout="prev, pager, next, jumper"
        :total="1000"
      >
      </el-pagination>
    </div>

    <!-- 弹层 -->

    <el-dialog
      title="编辑机构信息"
      :visible.sync="dialogVisible"
      width="45%"
      :before-close="handleClose"
      :append-to-body="true"
    >
      <p>机构名称：<el-input size="small" style="width: 300px"></el-input></p>
      <p>
        标准机构：
        <el-select
          v-model="value"
          placeholder="请选择"
          style="width: 300px"
          size="small"
        >
          <el-option label="测试" value="测试"> </el-option>
        </el-select>
      </p>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
  
  <script>
export default {
  data() {
    return {
      tableData: [
        {
          index:'1',
          name:'玉龙县人民医院',
          state:'正常',
          date:'2022-1011'
        }
      ],
      dialogVisible: false,
    };
  },
  methods: {
    handleClose() {
      this.dialogVisible = false;
    },
  },
};
</script>
  
  <style>
.keshi {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 20px;
}
</style>